import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';
import 'package:love_newf/app/com/http/Res.dart';
import 'package:love_newf/app/com/http/http_request.dart';

class RealNameAuthLogic extends GetxController {
  bool faceSDKInitSuccess = false;

  String code = "";
  String name = "";

  submit(data, xDeviceId, sKey) async {
    Res r = await HttpRequest().postRes("/api/user/realName", {
      "idCard": code,
      "name": name,
      "data": data,
      "skey": sKey,
      "x_device_id": xDeviceId
    });
    EasyLoading.dismiss();
    if (r.isSuccess()) {
      Get.back();
      EasyLoading.showSuccess("实名认证成功！");
    } else {
      EasyLoading.showSuccess(r.msg);
    }
  }
}
